package cn.com.shopec.erp.warehouse.service;

import java.util.List;

import cn.com.shopec.erp.common.page.PageFinder;
import cn.com.shopec.erp.common.page.PageQuery;
import cn.com.shopec.erp.warehouse.entity.StockTransfer;
import cn.com.shopec.erp.warehouse.entity.StockTransferProduct;
import cn.com.shopec.erp.warehouse.vo.StockTransferVo;

public interface IStockTransferService {

	/**
	 * 分页查询调拨信息
	 * @param stockTransfer
	 * @param pageQuery
	 * @return
	 */
	PageFinder<StockTransfer> queryStockTransferList(StockTransferVo stockTransfer, PageQuery pageQuery);
	
	/**
	 * 分页查询调拨商品信息
	 * @param stockTransfer
	 * @param pageQuery
	 * @return
	 */
	PageFinder<StockTransferProduct> queryStockTransferProductList(StockTransferVo stockTransfer, PageQuery pageQuery);

	/**
	 * 添加调拨信息
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean addStockTransfer(StockTransfer stockTransfer,List<StockTransferProduct> stockTransferProduct) throws Exception;

	/**
	 * 修改调拨信息
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean updateStockTransfer(StockTransfer stockTransfer,List<StockTransferProduct> stockTransferProduct) throws Exception;

	/**
	 * 删除调拨信息
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean deleteStockTransfer(String id) throws Exception;
	
	/**
	 * 根据id查询
	 * @param id
	 * @return
	 * @throws Exception 
	 */
	StockTransfer getStockTransferById(String id) throws Exception;
	
	/**
	 * 修改调拨流程状态信息（审核）
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean setApproveFlowState(String transferNo) throws Exception;
	
	/**
	 * 修改调拨流程状态信息（已生成出库单）
	 * @param transferNo
	 * @return
	 * @throws Exception
	 */
	boolean setStockOutFlowState(String transferNo) throws Exception;
	
	/**
	 * 修改调拨流程状态信息（出库完成）
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean setStockOutFinishFlowState(String stockOutTypeNo) throws Exception;
	
	/**
	 * 修改调拨流程状态信息（入库）
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean setStockInFlowState(String transferNo) throws Exception;

	/**
	 * 修改调拨流程状态信息（入库完成）
	 * 
	 * @param stockHistory
	 * @return
	 * @throws Exception
	 */
	boolean setStockInFinishFlowState(String transferNo) throws Exception;
	
}
